<template>
    <div class="iframe">
        <div class="i-title">
            <h3>包含传参</h3>
        </div>
        <div class="i-tip">子传父的值:{{cvalue}}</div>
        <child-comp :like="plike"
         @sendvalue="getsendvalue" />
    </div>
</template>

<script>
    import ChildComp from "./ChildComp.vue";
    import { ref } from "vue";
    export default {
        components: {
            ChildComp
        },
        setup() {
            let _plike = "明天会下雨";
            let _cvalue = ref("")
            function getsendvalue(d){
                console.log(d,"sf")
                _cvalue.value = d;
            }
            return {
                plike: _plike,
                cvalue:_cvalue,
                getsendvalue
            }
        }
    }
</script>

